﻿using System;
using System.Data;
using System.Data.SqlClient;
namespace LRC
{
    class Program
    {
        public static string connectionString;
        static void Main()
        {
            try
            {
                // connectionString = "server=.;database=DB_WMSFIRST;uid=sa;pwd=1qaz;";
                connectionString = "server=172.17.96.12;database=DB_WMSFIRST;uid=spcuser;pwd=sed2016@4;";

                Console.WriteLine("");
                Console.WriteLine("正在连接服务........");
                Console.WriteLine("");
                Console.WriteLine("");
                if (ConnectionSQL())
                {
                    Console.WriteLine("服务连接成功！");
                    Console.WriteLine("");
                    Console.WriteLine("");
                    #region 
                    //  1 20181024001 PT-JX200HBU %DE8550003
                    //  ExecuteSql(" UPDATE DB_WMSFIRST.[dbo].[T_Stock] SET BK11='1' WHERE Product_Model LIKE 'PT-JX200HBU%' and  Serial_Number LIKE'%DE8550003%'  AND PutList_NO ='20181024001' ");


                    // 2 2019-03-28 处理27号PDA以其他方式出库后，又重新入库时不能入库的情况{53条数据}
                    //int result = 0;
                    #region tblDatas
                    //DataTable tblDatas = new DataTable("Datas");
                    //tblDatas.Columns.Add("Product_Model", Type.GetType("System.String"));
                    //tblDatas.Columns.Add("Serial_Number", Type.GetType("System.String"));

                    //tblDatas.Rows.Add(new object[] { "PT-MW630U", "%DD8660004" });
                    //tblDatas.Rows.Add(new object[] { "PT-MW630U", "%DD8660001" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660038" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660026" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660074" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660029" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660044" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660041" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660082" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660083" });

                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660028" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660077" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660042" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660065" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570BA", "%DE8660066" });
                    //tblDatas.Rows.Add(new object[] { "PT-VX610EJ", "%DC9150132" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9150001" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC8640003" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC8640005" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9150006" });

                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9150002" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110014" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110013" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110023" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110028" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110010" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110006" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110033" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110077" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110009" });

                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110026" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110031" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110024" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110025" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110027" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NU", "%DC9110040" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9150312" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9150355" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9150347" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9150288" });

                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9150302" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9210129" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9210131" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9210142" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9210146" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW540U", "%DC9210139" });
                    //tblDatas.Rows.Add(new object[] { "PT-RZ570WA", "%DE8650004" });
                    //tblDatas.Rows.Add(new object[] { "PT-VZ580T", "%DC9210064" });
                    //tblDatas.Rows.Add(new object[] { "PT-VZ580T", "%DC9210065" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NE", "%DC9150005" });

                    //tblDatas.Rows.Add(new object[] { "PT-VW545NE", "%DC9150007" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NE", "%DC9150008" });
                    //tblDatas.Rows.Add(new object[] { "PT-VW545NE", "%DC9150006" });
                    #endregion
                    //for (int i = 0; i < tblDatas.Rows.Count; i++)
                    //{
                    //    ExecuteSql(" UPDATE [DB_WMSFIRST].[dbo].[T_Stock]        SET  BK11='1'  WHERE                 Product_Model = '" + tblDatas.Rows[i]["Product_Model"].ToString().Trim() + "' and  Serial_Number ='" + tblDatas.Rows[i]["Serial_Number"].ToString().Trim() + "'  ");
                    //    ExecuteSql(" UPDATE [DB_WMSFIRST].[dbo].[T_StockPrepare] SET  BK11='1'  WHERE Replace(Product_Model,' ','') = '" + tblDatas.Rows[i]["Product_Model"].ToString().Trim() + "' and  Serial_Number ='" + tblDatas.Rows[i]["Serial_Number"].ToString().Trim() + "'  ");
                    //    result++;
                    //}

                    //// 3  2019-04-13 
                    //int counts =  ExecuteSql(" update T_StockPrepare set BK11 =1 where NID in ( select  a.NID from T_StockPrepare a LEFT JOIN T_Stock b on a.Product_Model = b.Product_Model and  a.Serial_Number = b.Serial_Number where b.BK07 IN ( '返工', '改造', '借机', '其他' )  AND b.Update_UserID <> b.bk01 AND b.bk11 IS NULL AND b.PickList_NO IS NOT NULL ) ");

                    // 4  2019-05-30 
                    // int counts = ExecuteSql("   DELETE FROM DB_WMSFIRST.dbo.T_Pandian WHERE BK01='20190530' AND PainDian_machine='ET-JPF200WK' AND PainDian_KW='OPT0001' ");

                    // 5  2021-04-29 
                    //int counts = ExecuteSql("UPDATE DB_WMSFIRST.dbo.T_Stock SET OutList_NO= '20210412085058' ,PickList_NO= '1Z276V9A0476336141' ,BanHao= '1',Create_Time= '2021-4-12 8:58:49',BK06='1',BK07='UPS',BK08='20210412'  WHERE NID='790937'  ");

                    //// 6  2022-06-14 
                    //ExecuteSql("UPDATE DB_WMSFIRST.dbo.T_Stock SET " +
                    //           "BanHao= '1'," +
                    //           "BK11='1'," +
                    //           "BK06='1'," +
                    //           "BK08='20220217'  " +
                    //           "WHERE Product_Model='1XY1RZ990BU7' AND Serial_Number='%DA2150011' ");

                    //ExecuteSql("UPDATE DB_WMSFIRST.dbo.T_PickStockPrepare SET " +
                    //           "OutList_NO= 'V20220607OU' ," +
                    //           "BanHao= '1'," + 
                    //           "BK06='1'," + 
                    //           "WHERE Product_Model='1XY1RZ990BU7' AND Serial_Number='%DA2150011' AND BK08='20220217'  ");
                    #endregion

                    #region 
                    //// 7  2022-06-21 
                    //ExecuteSql("UPDATE DB_WMSFIRST.dbo.T_Stock SET OutList_NO= 'V20220607OU',BanHao = '4' WHERE Product_Model='1XY1RZ990BU7' AND Serial_Number='%DA2150011' ");
                    //ExecuteSql("DELETE FROM DB_WMSFIRST.dbo.T_Stock WHERE Product_Model='ET-YFB200' AND Serial_Number='ET-YFB200' ");

                    //// 8  2023-03-20 
                    //ExecuteSql("DELETE FROM [dbo].[TAutoFiles] WHERE Vison='V4.1.0.3.2.0'");


                    //// 9  2023-03-21 
                    //ExecuteSql("ALTER TABLE[T_DeoSale] ADD OrderNO varchar(50) NULL");
                    #endregion

                    #region 2023-02-03 T_PackBoxMachineCodeList
                    ////  10 2023-02-03
                    //ExecuteSql("TRUNCATE table  T_PackBoxMachineCodeList");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6098','TNPA6098-D',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6099','TNPA6099-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6110','TNPA6110-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6111','TNPA6111-D',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6101-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6102-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6103-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6104-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6105-D',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6106-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6107-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6108-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6109-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG001','TNPA6173-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6124','TNPA6124-D',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PB1DPLB1126AB','1PB1DPLB1126AB-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PB1DPLB1127AB','1PB1DPLB1127AB-D',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PB1DPLB1201','1PB1DPLB1201-D',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PB1DPLB1202','1PB1DPLB1202-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1184-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1185-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1186-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1188-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1193-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1194-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1195-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1196-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1197-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1198-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1189-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1191-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1192-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG002','1PB1DPLB1199-D',10);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG003','TXASX01VARZ-D',400);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PB1DPLB1126AC','1PB1DPLB1126AC-D',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PB1DPLB1201AB','1PB1DPLB1201AB-D',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG004','T0B10C885001-D',288);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG005','TNPA3942AB-D',288);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG006','TNPA4241-D',96);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG007','TNPA5194-D',96);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG008','TNPA6152-D',160);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6096-D','TNPA6096-D',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6097-D','TNPA6097-D',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG009','1PB1DPLB1128-D',192);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG010','TNPA6136-D',192);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PB1DPLB1144-D','1PB1DPLB1144-D',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('TNPA6123-D','TNPA6123-D',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG011','TNPA6135-D',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG011','TNPA6206-D',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG011','TNPA6207-D',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RQ13K-PB','1PF2RQ13K-PB',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG012','1PB1DPLB1211-D',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG012','1PB1DPLB1212-D',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG012','1PB1DPLB1213-D',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF1RS20K-PB','1PF1RS20K-PB',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF1RS11K-PB','1PF1RS11K-PB',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF1RZ21K-PB','1PF1RZ21K-PB',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RQ22K-PB','1PF2RQ22K-PB',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF1RZ12K-PB','1PF1RZ12K-PB',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG013','1WL1RQ50K',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG013','2WL1RQ50K',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG013','4WL1RQ50K',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RQ50K-PB-1','1PF2RQ50K-PB-1',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2MDN12G10C','1PF2MDN12G10C',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2MDN12G10','1PF2MDN12G10',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','2PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','3PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','4PF1RQ50K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','5PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','6PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','7PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','8PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG014','9PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','10PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','11PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','12PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','13PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','14PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','15PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','16PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','17PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','18PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG015','19PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('20PF1RQ50K','20PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG016','21PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG016','22PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG016','23PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG016','24PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG016','25PF1RQ50K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('26PF1RQ50K','26PF1RQ50K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('27PF1RQ50K','27PF1RQ50K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('28PF1RQ50K','28PF1RQ50K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('29PF1RQ50K','29PF1RQ50K',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('30PF1RQ50K','30PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('31PF1RQ50K','31PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('32PF1RQ50K','32PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('33PF1RQ50K','33PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('34PF1RQ50K','34PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG017','35PF1RQ50K',64);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('36PF1RQ50K','36PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('37PF1RQ50K','37PF1RQ50K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('51PF1RQ50K','51PF1RQ50K',3);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('52PF1RQ50K','52PF1RQ50K',3);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('53PF1RQ50K','53PF1RQ50K',3);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('54PF1RQ50K','54PF1RQ50K',3);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('55PF1RQ50K','55PF1RQ50K',3);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('56PF1RQ50K','56PF1RQ50K',3);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('57PF1RQ50K','57PF1RQ50K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('58PF1RQ50K','58PF1RQ50K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('59PF1RQ50K','59PF1RQ50K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('60PF1RQ50K','60PF1RQ50K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','9PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','10PF1RQ35K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','11PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','2PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','3PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','4PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','5PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','6PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG018','7PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','12PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','13PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','14PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','15PF1RQ35K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','16PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','17PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','18PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','19PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','21PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','22PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','23PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','24PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG019','25PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG020','2PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG020','3PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG020','4PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG020','5PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG020','6PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG020','7PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','12PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','13PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','14PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','15PF1RQ35K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','16PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','17PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','18PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','19PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','21PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','3PF1RZ34K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','23PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','24PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG021','25PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG022','28PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG022','29PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG022','30PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG022','31PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG022','32PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG023','29PF1RQ35YL',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG023','30PF1RQ35YL',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG023','32PF1RQ35YL',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RQ35K-PB','1PF2RQ35K-PB',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RZ34K-PB','1PF2RZ34K-PB',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('27PF1RQ35K','27PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('26PF1RQ35K','26PF1RQ35K',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('8PF1RQ35K','8PF1RQ35K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('34PF1RQ35K','34PF1RQ35K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('33PF1RQ35K','33PF1RQ35K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('35PF1RQ35K','35PF1RQ35K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('36PF1RQ35K','36PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('37PF1RQ35K','37PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('38PF1RQ35K','38PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('39PF1RQ35K','39PF1RQ35K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG024','1WL1RQ35K',112);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('51PF1RQ35K','51PF1RQ35K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('52PF1RQ35K','52PF1RQ35K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('53PF1RQ35K','53PF1RQ35K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('54PF1RQ35K','54PF1RQ35K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('55PF1RQ35K','55PF1RQ35K',2);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RQ35YL-PB','1PF2RQ35YL-PB',1);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RQ25K-PB','1PF2RQ25K-PB',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF2RZ24K-PB','1PF2RZ24K-PB',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','3PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','4PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','5PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','6PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','11PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','12PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','13PF1RQ25K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','14PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','15PF1RQ25K',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','16PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','17PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','18PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG025','19PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('20PF1RQ25K','20PF1RQ25K',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('21PF1RQ25K','21PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('22PF1RQ25K','22PF1RQ25K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('23PF1RQ25K','23PF1RQ25K',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('24PF1RQ25K','24PF1RQ25K',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG026','25PF1RQ25K',80);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG027','26PF1RQ25K',80);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('27PF1RQ25K','27PF1RQ25K',400);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('2PF1RQ25K','2PF1RQ25K',12);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG028','7PF1RQ25K',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG028','8PF1RQ25K',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG028','9PF1RQ25K',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG028','10PF1RQ25K',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('2PF1FRQ50BU7','2PF1FRQ50BU7',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('2PF1FRZ50BU7','2PF1FRZ50BU7',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('2PF1RZ120BU7','2PF1RZ120BU7',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('3PF1RZ120BU7','3PF1RZ120BU7',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('3PF1RZ790BU7','3PF1RZ790BU7',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('3PF1RZ990BU7','3PF1RZ990BU7',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('4PF1REQ12','4PF1REQ12',12);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','6PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','7PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','8PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','9PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','10PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','11PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','12PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','13PF1REQ12',16);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','14PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','15PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','16PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG032','17PF1REQ12',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('19PF1REQ12','19PF1REQ12',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('20PF1REQ12','20PF1REQ12',24);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG033','21PF1REQ12',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG033','22PF1REQ12',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG033','23PF1REQ12',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG033','24PF1REQ12',32);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG034','25PF1REQ12',80);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG035','26PF1REQ12',80);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('1PF1REQ12-PB','1PF1REQ12-PB',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1933ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1934ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1935ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1936ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1937ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1938ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1939ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1940ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1941ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1942ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1943ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1944ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1945ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG036','1PB1DVLB1946ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG037','1PB1DVLB1931ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG037','1PB1DVLB1949ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG037','1PB1DVLB1950ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG037','1PB1DVLB1951ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG037','1PB1DVLB1952ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG037','1PB1DVLB1953ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG038','1PB1DVLB1956ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG038','1PB1DVLB1932ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG038','1PB1DVLB1960ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG038','1PB1DVLB1947ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG038','1PB1DVLB1948ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1672ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1673ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1674ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1675ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1676ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1677ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1678ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1702ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1703ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1704ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1705ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1706ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1707ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1710ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1679ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG039','1PB1DVLB1680ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1672ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1673ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1674ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1675ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1676ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1677ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1678ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1702YA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1703ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1704ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1705ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1706ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1707ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1708ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1709ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1710ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1679ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG040','1PB1DVLB1680ZA-A',5);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG041','1PB1DVLB1668ZA-A',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG042','1PB1DVLB1684ZA-A',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG042','1PB1DVLB1685ZA-A',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG042','1PB1DVLB1686ZA-A',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG043','1PB1DVLB1689ZA-A',8);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG044','1PB1DVLB1664ZA-A',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG044','1PB1DVLB1665ZA-A',4);");
                    //ExecuteSql("insert into T_PackBoxMachineCodeList (box_code, machine_code, package_box_cnt) values ('WAIXIANG044','1PB1DVLB1666ZA-A',4);");
                    #endregion

                    ////  11 2023-04-12  
                    //ExecuteSql("update T_PickStockPrepare set BK07 = '领机' where BK07 = 'byuse'      and Update_time > '2023-03-06' ;");
                    //ExecuteSql("update T_PickStockPrepare set BK07 = '返工' where BK07 = 'reworks'    and Update_time > '2023-03-06'; ");
                    //ExecuteSql("update T_PickStockPrepare set BK07 = '改造' where BK07 = 'alteration' and Update_time > '2023-03-06';");
                    //ExecuteSql("update T_PickStockPrepare set BK07 = '借机' where BK07 = 'borrow'     and Update_time > '2023-03-06';");
                    //ExecuteSql("update T_PickStockPrepare set BK07 = '其他' where BK07 = 'other'      and Update_time > '2023-03-06';");
                    //ExecuteSql("update T_Stock set BK07 = '领机' where BK07 = 'byuse'      and Update_time > '2023-03-06' ;");
                    //ExecuteSql("update T_Stock set BK07 = '返工' where BK07 = 'reworks'    and Update_time > '2023-03-06'; ");
                    //ExecuteSql("update T_Stock set BK07 = '改造' where BK07 = 'alteration' and Update_time > '2023-03-06';");
                    //ExecuteSql("update T_Stock set BK07 = '借机' where BK07 = 'borrow'     and Update_time > '2023-03-06';");
                    //ExecuteSql("update T_Stock set BK07 = '其他' where BK07 = 'other'      and Update_time > '2023-03-06';");

                    //  12 2023-04-18  
                    ExecuteSql("UPDATE T_Stock SET PickList_NO = '20220927reworks' WHERE NID =1101925;");

                    Console.WriteLine(" 操作完成");
                    Console.WriteLine("");
                    Console.WriteLine("");
                    Console.WriteLine("按任意键退出！");
                    Console.ReadKey();
                }
                else
                {
                    Console.WriteLine(" 操作失败！ ");
                    Console.WriteLine("");
                    Console.WriteLine("");
                    Console.WriteLine(" 按任意键退出！");
                    Console.ReadKey();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message.ToString());
                Console.WriteLine(" 操作失败！ ");
                Console.WriteLine("");
                Console.WriteLine("");
                Console.WriteLine(" 按任意键退出！");
                Console.ReadKey();
            }
        }

        public static bool ConnectionSQL()
        {
            bool result = true;
            SqlConnection conn = null;
            try
            {
                conn = new SqlConnection(Database.ConnString);
                conn.Open();
                if (conn.State == ConnectionState.Open)
                {
                    result = true;
                    conn.Close();
                }
                else
                {
                    result = false;
                }
            }
            catch (Exception)
            {
                result = false;
            }
            finally
            {
                if (conn != null)
                {
                    conn.Dispose();
                    conn = null;
                }
            }
            return result;
        }
        public static int ExecuteSql(string SQLString)
        {
            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                using (SqlCommand cmd = new SqlCommand(SQLString, connection))
                {
                    try
                    {
                        connection.Open();
                        int rows = cmd.ExecuteNonQuery();
                        return rows;
                    }
                    catch (System.Data.SqlClient.SqlException e)
                    {
                        connection.Close();
                        throw e;
                    }
                    finally
                    {
                        cmd.Dispose();
                        connection.Close();
                    }
                }
            }
        }
    }

}
